#include <bits/stdc++.h>
using namespace std;

int n, m, q, u, v, x[100005], y[100005], p[100005], c[100005], d[100005], val[100005];
vector<int> edges[100005];
bool vis[1001][1001];
int que[1001 * 1001][2], front, rear;

bool bfs(int st, int en, int p) {
	memset(vis, 0, sizeof(vis));
	que[front = rear = 1][0] = st;
	que[1][1] = p;
	vis[st][p] = 1;
	while (rear + 1 != front) {
		int fx = que[front][0], fp = que[front][1]; ++front;
		if (fx == en) {
			return 1;
		}
		if (!vis[fx][max(fp, val[fx])]) {
			que[++rear][0] = fx;
			que[rear][1] = max(fp, val[fx]);
			vis[fx][max(fp, val[fx])] = 1;
		}
		if (fp) {
			for (auto j : edges[fx]) {
				if (!vis[j][fp - 1]) {
					que[++rear][0] = j;
					que[rear][1] = fp - 1;
					vis[j][fp - 1] = 1;
				}
			}
		}
	}
	return 0;
}

int main() {
	freopen("shu.in", "r", stdin);
	freopen("shu.out", "w", stdout);
	ios::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);
	cin >> n >> m >> q;
	bool A = 1, B = 1, C = 1, D = 1;
	for (int i = 1; i < n; ++i) {
		cin >> u >> v;
		edges[u].push_back(v);
		edges[v].push_back(u);
		if ((u == i && v == i + 1) || (u == i + 1 && v == i));
		else B = 0;
	}
	for (int i = 1; i <= q; ++i) {
		cin >> x[i] >> y[i] >> p[i];
		if (p[i] != p[1]) D = 0;
		if (y[i] != 1) C = 0;
	}
	for (int i = 1; i <= m; ++i) {
		cin >> c[i] >> d[i];
		val[c[i]] = max(val[c[i]], d[i]);
	}
	for (int i = 1; i <= n; ++i) {
		val[c[i]] = min(val[c[i]], n);
	}
	if (n <= 1000 && q <= 1000) {
		for (int i = 1; i <= q; ++i) {
			if (bfs(x[i],y[i],min(n,p[i]))) puts("YES");
			else puts("NO");
		}
	} else if (B && C) {
		
	}
	return 0;
}
